<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'CongfigCommunication.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <div>
    	<div>
    	<s:form action="cf_add">
    		<table>
    			<tr>
    				<td>
    					<s:textfield name="cfc.sequenceNumber" label="排序(数字越大排在越前)"></s:textfield>
    				</td>
    				<td>
    					<s:select list="ctList" listKey="Id" listValue="type" headerKey="0" headerValue="请选择" name="ct.Id" value="%{cfc.connnectionType.Id}" label="个人通讯录关系名称"></s:select>
    				</td>
    				<td>操作：<s:submit value="添加" align="left"></s:submit><s:reset value="清空" align="left"></s:reset></td>
    			</tr>
    		</table>
    		</s:form>
    	</div>
    	<div><s:form action="cf_addRelationTypeJsp"><s:submit value="增加交际关系"></s:submit> </s:form> </div>
    	<div>
    		<table border="1">
    		<tr>
    			<td>序号:</td>
    			<td>排序(数字越大排在越前):</td>
    			<td>个人通讯录关系名称:</td>
    			<td>操作:</td>
    		</tr>
    			<s:iterator value="congfigCommunications" id="cfc">
    			<tr align="center">
    				<td style="width: 150px;height: 10px;">
    				<s:property value="#cfc.Id" /></td>
    				<td style="width: 200px;height: 10px;">
    				
    				<s:property value="#cfc.sequenceNumber" />
    				</td>
    				<td style="width: 150px;height: 10px;">
    				<s:property value="#cfc.connectionType.type"/></td>
    				<td>
    				<s:form action="cf_updateJsp">
    						<s:hidden name="Id" value="%{#cfc.Id}"></s:hidden>
    						<s:submit value="修改"></s:submit></s:form><s:form action="cf_delete">
    						<s:hidden name="Id" value="%{#cfc.Id}"></s:hidden>
    						<s:submit value="删除"></s:submit>
    					</s:form>
    				</td>
    			</tr>
    			</s:iterator>
    		</table>
    	</div>
    	<input name="close" type="button" value=" 返回 "
								onClick="javascript:history.go(-1);"/>
    </div>
  </body>
</html>
